import request from '@/utils/request'

// 查询学期列表
export function listScore(query) {
  return request({
    url: '/system/studentgrade/list',
    method: 'get',
    params: query
  })
}

// 查询学期详细
export function getScore(scoreId) {
  return request({
    url: '/system/studentgrade/' + scoreId,
    method: 'get'
  })
}

// 新增学期
export function addScore(data) {
  return request({
    url: '/system/studentgrade',
    method: 'post',
    data: data
  })
}

// 修改学期
export function updateScore(data) {
  return request({
    url: '/system/studentgrade',
    method: 'put',
    data: data
  })
}

// 删除学期
export function delScore(scoreId) {
  return request({
    url: '/system/studentgrade/' + scoreId,
    method: 'delete'
  })
}

// 获取学生某学期分配课程
export function getStudentCourses(data) {
  return request({
    url: '/system/studentgrade/courses',
    method: 'get',
    params : {
      studentSno: data.studentSno,
      termId: data.termId
    }
  })
}